Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix waiting for CRD sync at server start #118104

Merged
merged 2 commits into from
May 18, 2023
Merged

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented May 18, 2023

What type of PR is this?

/kind bug
/priority critical-urgent

What this PR does / why we need it:

Fixes logic checking whether we should wait for CRD sync at server start before reconciling APIService objects

Which issue(s) this PR fixes:

Fixes #118103

Test commit best reviewed ignoring whitespace (https://github.com/kubernetes/kubernetes/pull/118104/files?w=1)

Does this PR introduce a user-facing change?

Fixes a bug at kube-apiserver start where APIService objects for custom resources could be deleted and recreated.

/assign @deads2k
/sig api-machinery

@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label May 18, 2023
@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 18, 2023
@liggitt
Copy link
Member Author

liggitt commented May 18, 2023

verified this resolves the issue by starting a server and looking at logs, but need to figure out how to exercise this with a test

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 18, 2023
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels May 18, 2023
@liggitt
Copy link
Member Author

liggitt commented May 18, 2023

added an integration test and ensured it failed on master without the startup fix

@k8s-ci-robot k8s-ci-robot added area/test sig/testing Categorizes an issue or PR as relevant to SIG Testing. labels May 18, 2023
Copy link
Member

@logicalhan logicalhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 18, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: fadf2eccff5811a82929c57efea739e351b35c5c

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: liggitt, logicalhan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@liggitt
Copy link
Member Author

liggitt commented May 18, 2023

forgot to close the etcd client I created in the integration test, which tripped the goroutine check:

E0518 15:46:59.373971   86360 etcd.go:217] "EtcdMain goroutine check" err=<
	found unexpected goroutines:
	[Goroutine 135 in state select, 1 minutes, with k8s.io/kubernetes/vendor/google.golang.org/grpc.(*ccBalancerWrapper).watcher on top of the stack:
	goroutine 135 [select, 1 minutes]:
	k8s.io/kubernetes/vendor/google.golang.org/grpc.(*ccBalancerWrapper).watcher(0xc000b37200)

pushed fix

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 18, 2023
Copy link
Member

@logicalhan logicalhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 18, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: d7d1c096466330b99a68042e5e6c8028f5e3aa8d

@cici37
Copy link
Contributor

cici37 commented May 18, 2023

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 18, 2023
@k8s-ci-robot k8s-ci-robot merged commit 7ad8303 into kubernetes:master May 18, 2023
13 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.28 milestone May 18, 2023
k8s-ci-robot added a commit that referenced this pull request May 19, 2023
…104-upstream-release-1.26

Automated cherry pick of #118104: Fix waiting for CRD sync at server start
k8s-ci-robot added a commit that referenced this pull request May 19, 2023
…104-upstream-release-1.25

Automated cherry pick of #118104: Fix waiting for CRD sync at server start
k8s-ci-robot added a commit that referenced this pull request May 19, 2023
…104-upstream-release-1.24

Automated cherry pick of #118104: Fix waiting for CRD sync at server start
k8s-ci-robot added a commit that referenced this pull request May 19, 2023
…104-upstream-release-1.27

Automated cherry pick of #118104: Fix waiting for CRD sync at server start
@liggitt liggitt deleted the crd-sync branch July 31, 2023 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/apiserver area/test cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/critical-urgent Highest priority. Must be actively worked on as someone's top priority right now. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/testing Categorizes an issue or PR as relevant to SIG Testing. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APIServices can be deleted at the apiserver startup
5 participants